package com.xgc.book.bookserver.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 图书章节表
 * </p>
 *
 * @author wrz
 * @since 2023-11-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "br_book_catalog", resultMap = "catalogMap")
public class BookCatalogBean implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 章节名称
     */
    @TableField("catalog_name")
    private String catalogName;

    /**
     * 章节内容
     */
    @TableField("content")
    private String content;

    /**
     * 图书编号
     */
    @TableField("book_id")
    private Integer bookId;

    /**
     * 发布时间
     */
    @TableField("apply_time")
    private Date applyTime;

    /**
     * 章节状态1发表2草稿默认1
     */
    @TableField("catalog_status")
    private Integer catalogStatus;

    /**
     * 章节排序
     */
    @TableField("order_no")
    private Integer orderNo;

    /**
     * 状态1可用2禁用,默认1
     */
    @TableField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "create_user", fill = FieldFill.INSERT)
    private Integer createUser;

    /**
     * 最后一次修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 最后一次修改人
     */
    @TableField(value = "update_user", fill = FieldFill.UPDATE)
    private Integer updateUser;

    @TableField(exist = false)
    private Date[] applyTimeRange;

    @TableField(exist = false)
    private BookBean book;

}
